package com.project.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

//异常处理类
@ControllerAdvice
public class MyException extends Exception {
    @ExceptionHandler
    public void myHandleException(Exception ex){
        System.out.println("出现异常");
    }
}
